<!DOCTYPE html>
<html>
<head><meta name="generator" content="Hexo 3.8.0">
    

    

    



    <meta charset="utf-8">
    
    
    
    
    <title>自带“歧视性”的IE11 input事件 | 个人博客 | 一个coder的成长记录</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    
    <meta name="theme-color" content="#3F51B5">
    
    
    <meta name="keywords" content="ie,input">
    <meta name="description" content="自带“歧视性”的IE11 input事件 第一次碰到自带的歧视的bug，IE 11泥潭不解释。  起因 ant-design-vue的RangePicker在IE11下calendar panel无法正常展开，看图。">
<meta name="keywords" content="ie,input">
<meta property="og:type" content="article">
<meta property="og:title" content="自带“歧视性”的IE11 input事件">
<meta property="og:url" content="https://betgar.github.io/2019/07/02/the-weird-input-event-in-ie11/index.html">
<meta property="og:site_name" content="个人博客">
<meta property="og:description" content="自带“歧视性”的IE11 input事件 第一次碰到自带的歧视的bug，IE 11泥潭不解释。  起因 ant-design-vue的RangePicker在IE11下calendar panel无法正常展开，看图。">
<meta property="og:locale" content="zh-CN">
<meta property="og:image" content="https://raw.githubusercontent.com/betgar/betgar.github.io/master/img/picgo/20190703083034-date-picker-range.gif">
<meta property="og:image" content="https://raw.githubusercontent.com/betgar/betgar.github.io/master/img/picgo/20190703135734-placeholder.jpg">
<meta property="og:image" content="https://raw.githubusercontent.com/betgar/betgar.github.io/master/img/picgo/20190703135916-input-event.jpg">
<meta property="og:image" content="https://raw.githubusercontent.com/betgar/betgar.github.io/master/img/picgo/20190703141746-reproduce.gif">
<meta property="og:updated_time" content="2020-03-12T03:37:06.928Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="自带“歧视性”的IE11 input事件">
<meta name="twitter:description" content="自带“歧视性”的IE11 input事件 第一次碰到自带的歧视的bug，IE 11泥潭不解释。  起因 ant-design-vue的RangePicker在IE11下calendar panel无法正常展开，看图。">
<meta name="twitter:image" content="https://raw.githubusercontent.com/betgar/betgar.github.io/master/img/picgo/20190703083034-date-picker-range.gif">
    
        <link rel="alternate" type="application/atom+xml" title="个人博客" href="/atom.xml">
    
    <link rel="shortcut icon" href="/favicon.ico">
    <link rel="stylesheet" href="//unpkg.com/hexo-theme-material-indigo@latest/css/style.css">
    <script>window.lazyScripts=[]</script>

    <!-- custom head -->
    

</head>

<body>
    <div id="loading" class="active"></div>

    <aside id="menu" class="hide">
  <div class="inner flex-row-vertical">
    <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menu-off">
        <i class="icon icon-lg icon-close"></i>
    </a>
    <div class="brand-wrap" style="background-image:url(/img/brand.jpg)">
      <div class="brand">
        <a href="/" class="avatar waves-effect waves-circle waves-light">
          <img src="/img/avatar.jpg">
        </a>
        <hgroup class="introduce">
          <h5 class="nickname">俊男</h5>
          <a href="mailto:betgar@163.com" title="betgar@163.com" class="mail">betgar@163.com</a>
        </hgroup>
      </div>
    </div>
    <div class="scroll-wrap flex-col">
      <ul class="nav">
        
            <li class="waves-block waves-effect">
              <a href="/">
                <i class="icon icon-lg icon-home"></i>
                Home
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/archives">
                <i class="icon icon-lg icon-archives"></i>
                Archives
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/tags">
                <i class="icon icon-lg icon-tags"></i>
                Tags
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/categories">
                <i class="icon icon-lg icon-th-list"></i>
                Categories
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://github.com/betgar" target="_blank">
                <i class="icon icon-lg icon-github"></i>
                Github
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://weibo.com/u/2296734915" target="_blank">
                <i class="icon icon-lg icon-weibo"></i>
                Weibo
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/about">
                <i class="icon icon-lg icon-link"></i>
                About
              </a>
            </li>
        
      </ul>
    </div>
  </div>
</aside>

    <main id="main">
        <header class="top-header" id="header">
    <div class="flex-row">
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light on" id="menu-toggle">
          <i class="icon icon-lg icon-navicon"></i>
        </a>
        <div class="flex-col header-title ellipsis">自带“歧视性”的IE11 input事件</div>
        
        <div class="search-wrap" id="search-wrap">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="back">
                <i class="icon icon-lg icon-chevron-left"></i>
            </a>
            <input type="text" id="key" class="search-input" autocomplete="off" placeholder="输入感兴趣的关键字">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="search">
                <i class="icon icon-lg icon-search"></i>
            </a>
        </div>
        
        
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menuShare">
            <i class="icon icon-lg icon-share-alt"></i>
        </a>
        
    </div>
</header>
<header class="content-header post-header">

    <div class="container fade-scale">
        <h1 class="title">自带“歧视性”的IE11 input事件</h1>
        <h5 class="subtitle">
            
                <time datetime="2019-07-02T12:30:00.000Z" itemprop="datePublished" class="page-time">
  2019-07-02
</time>


	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/categories/ie/">ie</a><ul class="article-category-list-child"><li class="article-category-list-item"><a class="article-category-list-link" href="/categories/ie/input/">input</a></li></ul></li></ul>

            
        </h5>
    </div>

    


</header>


<div class="container body-wrap">
    
    <aside class="post-widget">
        <nav class="post-toc-wrap post-toc-shrink" id="post-toc">
            <h4>TOC</h4>
            <ol class="post-toc"><li class="post-toc-item post-toc-level-1"><a class="post-toc-link" href="#自带“歧视性”的IE11-input事件"><span class="post-toc-number">1.</span> <span class="post-toc-text">自带“歧视性”的IE11 input事件</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#起因"><span class="post-toc-number">1.1.</span> <span class="post-toc-text">起因</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#Date-parse行为诡异"><span class="post-toc-number">1.2.</span> <span class="post-toc-text">Date.parse行为诡异</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#Date-toString"><span class="post-toc-number">1.2.1.</span> <span class="post-toc-text">Date#toString()</span></a></li></ol></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#placeholder和input事件"><span class="post-toc-number">1.3.</span> <span class="post-toc-text">placeholder和input事件</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#临时处理方案"><span class="post-toc-number">1.3.1.</span> <span class="post-toc-text">临时处理方案</span></a></li></ol></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#总结"><span class="post-toc-number">1.4.</span> <span class="post-toc-text">总结</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#参考"><span class="post-toc-number">1.5.</span> <span class="post-toc-text">参考</span></a></li></ol></li></ol>
        </nav>
    </aside>


<article id="post-the-weird-input-event-in-ie11" class="post-article article-type-post fade" itemprop="blogPost">

    <div class="post-card">
        <h1 class="post-card-title">自带“歧视性”的IE11 input事件</h1>
        <div class="post-meta">
            <time class="post-time" title="2019-07-02 20:30:00" datetime="2019-07-02T12:30:00.000Z" itemprop="datePublished">2019-07-02</time>

            
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/categories/ie/">ie</a><ul class="article-category-list-child"><li class="article-category-list-item"><a class="article-category-list-link" href="/categories/ie/input/">input</a></li></ul></li></ul>



            
<span id="busuanzi_container_page_pv" title="文章总阅读量" style="display:none">
    <i class="icon icon-eye icon-pr"></i><span id="busuanzi_value_page_pv"></span>
</span>


        </div>
        <div class="post-content" id="post-content" itemprop="postContent">
            <h1 id="自带“歧视性”的IE11-input事件"><a href="#自带“歧视性”的IE11-input事件" class="headerlink" title="自带“歧视性”的IE11 input事件"></a>自带“歧视性”的IE11 input事件</h1><blockquote>
<p>第一次碰到自带的歧视的bug，IE 11泥潭不解释。</p>
</blockquote>
<h2 id="起因"><a href="#起因" class="headerlink" title="起因"></a>起因</h2><blockquote>
<p><code>ant-design-vue</code>的<code>RangePicker</code>在IE11下calendar panel无法正常展开，看图。</p>
</blockquote>
<figure class="image-bubble">
                <div class="img-lightbox">
                    <div class="overlay"></div>
                    <img src="https://raw.githubusercontent.com/betgar/betgar.github.io/master/img/picgo/20190703083034-date-picker-range.gif" alt="RangePicker" title>
                </div>
                <div class="image-caption">RangePicker</div>
            </figure>
<blockquote>
<p>具体的相关讨论看参考链接中的<code>ant-design-vue</code>部分。</p>
</blockquote>
<p>因为我知道IE和firefox、chrome下时间处理有问题（es5之前），以为是Date的问题，所以我的调试方向就走偏了，顺便介绍下Date.parse的行为，new Date(‘字符串’)，内部使用Date.parse解析。</p>
<h2 id="Date-parse行为诡异"><a href="#Date-parse行为诡异" class="headerlink" title="Date.parse行为诡异"></a>Date.parse行为诡异</h2><blockquote>
<p><strong>参考链接</strong>部分有大量的Date知识总结，多多浏览。</p>
<p><code>Date.parse</code>在ES5之前不同浏览器，行为差异很大。现在我只能重现一下IE下的，Chrome和firefox版本都太高，已经修正这个问题。如果想看以前的兼容性问题，看这篇博客<a href="http://blog.dygraphs.com/2012/03/javascript-and-dates-what-mess.html" target="_blank" rel="noopener">javascript-and-dates-what-mess</a></p>
</blockquote>
<figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 控制台</span></span><br><span class="line"><span class="keyword">new</span> <span class="built_in">Date</span>(<span class="string">'2019-07-02'</span>)</span><br><span class="line"><span class="comment">// Tue Jul 02 2019 08:00:00 GMT+0800 (中国标准时间)</span></span><br><span class="line"><span class="keyword">new</span> <span class="built_in">Date</span>(<span class="string">'2019/07/02'</span>)</span><br><span class="line"><span class="comment">// Tue Jul 02 2019 00:00:00 GMT+0800 (中国标准时间)</span></span><br></pre></td></tr></table></figure>
<p>看到区别了吗？time部分，一个从0点开始，一个从8点开始，为啥呢？看看MDN怎么说吧。</p>
<blockquote>
<p><a href="https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Date/parse" target="_blank" rel="noopener">MDN文档</a>不推荐在ES5之前使用Date.parse方法，因为字符串的解析完全取决于实现。直到至今，不同宿主在如何解析日期字符串上仍存在许多差异，因此最好还是手动解析日期字符串（在需要适应不同格式时库能起到很大帮助）。</p>
</blockquote>
<p><strong>注意</strong>：如果你要兼容IE，对日期处理，请使用专门的类库，例如：<code>moment.js, day.js</code>之类。</p>
<h3 id="Date-toString"><a href="#Date-toString" class="headerlink" title="Date#toString()"></a>Date#toString()</h3><blockquote>
<p>顺便提一下，Date#toString()竟然有规范，看这里<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toString#Description" target="_blank" rel="noopener">Date.toString</a>，所以从Date字符串中解析提取一些字符可以放心大胆的用。以后推荐使用<a href="https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Intl" target="_blank" rel="noopener">Intl对象是 ECMAScript 国际化 API 的一个命名空间，它提供了精确的字符串对比、数字格式化，和日期时间格式化</a></p>
</blockquote>
<figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 提取GMT时区</span></span><br><span class="line"><span class="comment"> * @param date</span></span><br><span class="line"><span class="comment"> * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toString#Description</span></span><br><span class="line"><span class="comment"> * @returns ''或者GMT，或者GMT+0000或者GMT-0000；其中0000代表GMT偏移量，是四位前两位表示hours小时，后两位表示minuts分钟.</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">extractTimezoneOffsetWithGMT</span>(<span class="params">date</span>) </span>&#123;</span><br><span class="line">  <span class="keyword">if</span> (!date) &#123;</span><br><span class="line">    <span class="keyword">return</span> <span class="string">''</span>;</span><br><span class="line">  &#125;</span><br><span class="line">  <span class="keyword">const</span> dateTimeStr = date.toString(); <span class="comment">// Thu May 23 2019 14:52:15 GMT+0800 (中国标准时间)</span></span><br><span class="line">  <span class="keyword">const</span> gmtIndexStart = dateTimeStr.indexOf(<span class="string">'GMT'</span>);</span><br><span class="line">  <span class="keyword">const</span> timezoneEnd = dateTimeStr.indexOf(<span class="string">' '</span>, gmtIndexStart);</span><br><span class="line"></span><br><span class="line">  <span class="keyword">return</span> dateTimeStr.substring(gmtIndexStart, timezoneEnd);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h2 id="placeholder和input事件"><a href="#placeholder和input事件" class="headerlink" title="placeholder和input事件"></a>placeholder和input事件</h2><blockquote>
<p>和<code>ant-design-vue</code>维护者沟通之后，得知这个bug在<code>ant-design-vue</code>的英文语言模式下不会有问题，维护的小伙伴，推测语言环境不同，有可能导致编译的代码不同（也有道理，现在js都上编译器，你不知道编译后代码有多大变化，当时已经提到了placeholder，我没注意）。</p>
</blockquote>
<p>思路：英文版和中文版，最大的不同应该是语言文件，涉及到<code>RangePicker</code>只有<strong>时间格式</strong>和<strong>placeholder</strong>，时间格式已经怀疑过，因为底层使用moment库处理，所以没问题。所以只能看看placeholder兼容性。</p>
<blockquote>
<p>placeholder兼容性</p>
</blockquote>
<figure class="image-bubble">
                <div class="img-lightbox">
                    <div class="overlay"></div>
                    <img src="https://raw.githubusercontent.com/betgar/betgar.github.io/master/img/picgo/20190703135734-placeholder.jpg" alt="caniuse-placeholder" title>
                </div>
                <div class="image-caption">caniuse-placeholder</div>
            </figure>
<p><strong>注意</strong>：看下<strong>Known issues</strong>的tab页签，看到第二条，我震惊了，为啥当placeholder为中文时会触发input事件？？？</p>
<blockquote>
<p>input事件的兼容性</p>
</blockquote>
<figure class="image-bubble">
                <div class="img-lightbox">
                    <div class="overlay"></div>
                    <img src="https://raw.githubusercontent.com/betgar/betgar.github.io/master/img/picgo/20190703135916-input-event.jpg" alt="caniuse-input-event" title>
                </div>
                <div class="image-caption">caniuse-input-event</div>
            </figure>
<blockquote>
<p>重现IE11当placeholder=”中文”时，触发input事件</p>
</blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE html&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span> <span class="attr">lang</span>=<span class="string">"en"</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">"UTF-8"</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">meta</span> <span class="attr">name</span>=<span class="string">"viewport"</span> <span class="attr">content</span>=<span class="string">"width=device-width, initial-scale=1.0"</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">meta</span> <span class="attr">http-equiv</span>=<span class="string">"X-UA-Compatible"</span> <span class="attr">content</span>=<span class="string">"ie=edge"</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">title</span>&gt;</span>placeholder<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">div</span> <span class="attr">id</span>=<span class="string">"content"</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">"text"</span> <span class="attr">placeholder</span>=<span class="string">"english"</span> <span class="attr">id</span>=<span class="string">"en"</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">"text"</span> <span class="attr">placeholder</span>=<span class="string">"中文"</span> <span class="attr">id</span>=<span class="string">"cn"</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="undefined"></span></span><br><span class="line"><span class="undefined"></span></span><br><span class="line"><span class="javascript">    <span class="built_in">window</span>.onload = <span class="function"><span class="keyword">function</span> (<span class="params"></span>) </span>&#123;</span></span><br><span class="line"><span class="javascript">      <span class="keyword">var</span> enInput = <span class="built_in">document</span>.getElementById(<span class="string">'en'</span>);</span></span><br><span class="line"><span class="javascript">      <span class="keyword">var</span> cnInput = <span class="built_in">document</span>.getElementById(<span class="string">'cn'</span>);</span></span><br><span class="line"><span class="javascript">      enInput.addEventListener(<span class="string">'input'</span>, <span class="function"><span class="keyword">function</span> (<span class="params">evt</span>) </span>&#123;</span></span><br><span class="line"><span class="javascript">        <span class="built_in">console</span>.log(<span class="string">'en inpu'</span>);</span></span><br><span class="line"><span class="undefined">      &#125;);</span></span><br><span class="line"><span class="javascript">      cnInput.addEventListener(<span class="string">'input'</span>, <span class="function"><span class="keyword">function</span> (<span class="params">evt</span>) </span>&#123;</span></span><br><span class="line"><span class="javascript">        <span class="built_in">console</span>.log(<span class="string">'cn input'</span>);</span></span><br><span class="line"><span class="undefined">      &#125;);</span></span><br><span class="line"><span class="undefined">    &#125;</span></span><br><span class="line"><span class="undefined">  </span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
<figure class="image-bubble">
                <div class="img-lightbox">
                    <div class="overlay"></div>
                    <img src="https://raw.githubusercontent.com/betgar/betgar.github.io/master/img/picgo/20190703141746-reproduce.gif" alt="placeholder-fire-input-event" title>
                </div>
                <div class="image-caption">placeholder-fire-input-event</div>
            </figure>
<h3 id="临时处理方案"><a href="#临时处理方案" class="headerlink" title="临时处理方案"></a>临时处理方案</h3><blockquote>
<p>知道了原因就很容易处理了，只要input的placeholder=””就搞定了，虽然不好看，总比有bug好。</p>
</blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!-- 重置placeholder，因为默认有语言文件，placeholder默认有文字的 --&gt;</span></span><br><span class="line"> <span class="tag">&lt;<span class="name">a-range-picker</span> @<span class="attr">change</span>=<span class="string">"onChange"</span> <span class="attr">:placeholder</span>=<span class="string">"['', '']"</span>/&gt;</span></span><br></pre></td></tr></table></figure>
<blockquote>
<p>到这里才找到真正造成<code>RangePicker</code>问题的原因，反馈给了<code>ant-desing-vue</code>维护小伙伴，他们下次修复上线。</p>
</blockquote>
<h2 id="总结"><a href="#总结" class="headerlink" title="总结"></a>总结</h2><p>解决问题的思路很重要，很重要，以后如果碰到IE下的问题，第一时间<code>https://caniuse.com/</code>网站看兼容性，被IE坑怕了，兼容IE，就是在浪费生命。</p>
<h2 id="参考"><a href="#参考" class="headerlink" title="参考"></a>参考</h2><p><a href="https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Date/parse" target="_blank" rel="noopener">Date.parse</a></p>
<p><a href="http://javascript.ruanyifeng.com/stdlib/date.html#toc4" target="_blank" rel="noopener">阮一峰 JavaScript标准参考教程 Date对象</a></p>
<p><a href="http://blog.dygraphs.com/2012/03/javascript-and-dates-what-mess.html" target="_blank" rel="noopener">javascript-and-dates-what-mess</a></p>
<p><a href="http://chitanda.me/2015/08/21/the-trivia-of-js-date-function/" target="_blank" rel="noopener">JS原生Date类型方法的一些冷知识</a></p>
<p><a href="https://github.com/wx-chevalier/ProgrammingLanguage-Series/blob/master/JavaScript/数据结构/时间与日期.md" target="_blank" rel="noopener">wxyyxc1992–时间与日期</a></p>
<p><a href="https://github.com/vueComponent/ant-design-vue/issues/608" target="_blank" rel="noopener">IE11日历选择框有值的情况无法打开选择框</a><br><a href="https://github.com/vueComponent/ant-design-vue/issues/626" target="_blank" rel="noopener">ie11下组件DatePicker 日期选择框不显示且控制台报错</a><br><a href="https://github.com/vueComponent/ant-design-vue/issues/865" target="_blank" rel="noopener">IE下点击RangePicker会闪一下关闭，openChange执行3次</a></p>

        </div>

        <blockquote class="post-copyright">
    
    <div class="content">
        
<span class="post-time">
    最后更新时间：<time datetime="2020-03-12T03:37:06.928Z" itemprop="dateUpdated">2020-03-12 11:37:06</time>
</span><br>


        
        原文链接：<a href="/2019/07/02/the-weird-input-event-in-ie11/" target="_blank" rel="external">https://betgar.github.io/2019/07/02/the-weird-input-event-in-ie11/</a>
        
    </div>
    
    <footer>
        <a href="https://betgar.github.io">
            <img src="/img/avatar.jpg" alt="俊男">
            俊男
        </a>
    </footer>
</blockquote>

        


        <div class="post-footer">
            
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/ie/">ie</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/input/">input</a></li></ul>


            
<div class="page-share-wrap">
    

<div class="page-share" id="pageShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=https://betgar.github.io/2019/07/02/the-weird-input-event-in-ie11/&title=《自带“歧视性”的IE11 input事件》 — 个人博客&pic=https://betgar.github.io/img/avatar.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=https://betgar.github.io/2019/07/02/the-weird-input-event-in-ie11/&title=《自带“歧视性”的IE11 input事件》 — 个人博客&source=各种技术加身的coder" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https://betgar.github.io/2019/07/02/the-weird-input-event-in-ie11/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《自带“歧视性”的IE11 input事件》 — 个人博客&url=https://betgar.github.io/2019/07/02/the-weird-input-event-in-ie11/&via=https://betgar.github.io" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=https://betgar.github.io/2019/07/02/the-weird-input-event-in-ie11/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>



    <a href="javascript:;" id="shareFab" class="page-share-fab waves-effect waves-circle">
        <i class="icon icon-share-alt icon-lg"></i>
    </a>
</div>



        </div>
    </div>

    
<nav class="post-nav flex-row flex-justify-between">
  
    <div class="waves-block waves-effect prev">
      <a href="/2019/07/03/ie11-lost-cookie-when-domain-is-localhost/" id="post-prev" class="post-nav-link">
        <div class="tips"><i class="icon icon-angle-left icon-lg icon-pr"></i> Prev</div>
        <h4 class="title">重新认识Cookie的限制</h4>
      </a>
    </div>
  

  
    <div class="waves-block waves-effect next">
      <a href="/2019/07/02/svg-elements-default-focusable-in-ie11/" id="post-next" class="post-nav-link">
        <div class="tips">Next <i class="icon icon-angle-right icon-lg icon-pl"></i></div>
        <h4 class="title">前端小纠结--IE11下SVG元素默认focusable=true</h4>
      </a>
    </div>
  
</nav>



    











    <!-- Valine Comments -->
    <div class="comments vcomment" id="comments"></div>
    <script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
    <script src="//unpkg.com/valine@latest/dist/Valine.min.js"></script>
    <!-- Valine Comments script -->
    <script>
        var GUEST_INFO = ['nick','mail','link'];
        var guest_info = 'nick,mail,link'.split(',').filter(function(item){
          return GUEST_INFO.indexOf(item) > -1
        });
        new Valine({
            el: '#comments',
            notify: 'false' == 'true',
            verify: 'false' == 'true',
            appId: "kiGWA9mdoVtQlfGYA5uDBNX7-gzGzoHsz",
            appKey: "dHCOdD0oEIjJd0cJoAHHN0y3",
            avatar: "mm",
            placeholder: "Just comment it",
            guest_info: guest_info.length == 0 ? GUEST_INFO : guest_info,
            pageSize: "10"
        })
    </script>
    <!-- Valine Comments end -->







</article>



</div>

        <footer class="footer">
    <div class="top">
        
<p>
    <span id="busuanzi_container_site_uv" style="display:none">
        站点总访客数：<span id="busuanzi_value_site_uv"></span>
    </span>
    <span id="busuanzi_container_site_pv" style="display:none">
        站点总访问量：<span id="busuanzi_value_site_pv"></span>
    </span>
</p>


        <p>
            
                <span><a href="/atom.xml" target="_blank" class="rss" title="rss"><i class="icon icon-lg icon-rss"></i></a></span>
            
            <span>博客内容遵循 <a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh">知识共享 署名 - 非商业性 - 相同方式共享 4.0 国际协议</a></span>
        </p>
    </div>
    <div class="bottom">
        <p><span>俊男 &copy; 2017 - 2020</span>
            <span>
                
                Power by <a href="http://hexo.io/" target="_blank">Hexo</a> Theme <a href="https://github.com/yscoder/hexo-theme-indigo" target="_blank">indigo</a>
            </span>
        </p>
    </div>
</footer>

    </main>
    <div class="mask" id="mask"></div>
<a href="javascript:;" id="gotop" class="waves-effect waves-circle waves-light"><span class="icon icon-lg icon-chevron-up"></span></a>



<div class="global-share" id="globalShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=https://betgar.github.io/2019/07/02/the-weird-input-event-in-ie11/&title=《自带“歧视性”的IE11 input事件》 — 个人博客&pic=https://betgar.github.io/img/avatar.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=https://betgar.github.io/2019/07/02/the-weird-input-event-in-ie11/&title=《自带“歧视性”的IE11 input事件》 — 个人博客&source=各种技术加身的coder" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https://betgar.github.io/2019/07/02/the-weird-input-event-in-ie11/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《自带“歧视性”的IE11 input事件》 — 个人博客&url=https://betgar.github.io/2019/07/02/the-weird-input-event-in-ie11/&via=https://betgar.github.io" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=https://betgar.github.io/2019/07/02/the-weird-input-event-in-ie11/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>


<div class="page-modal wx-share" id="wxShare">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <p>扫一扫，分享到微信</p>
    <img src="" alt="微信分享二维码">
</div>




    <script src="//cdn.bootcss.com/node-waves/0.7.4/waves.min.js"></script>
<script>
var BLOG = { ROOT: '/', SHARE: true, REWARD: false };


</script>

<script src="//unpkg.com/hexo-theme-material-indigo@latest/js/main.min.js"></script>


<div class="search-panel" id="search-panel">
    <ul class="search-result" id="search-result"></ul>
</div>
<template id="search-tpl">
<li class="item">
    <a href="{path}" class="waves-block waves-effect">
        <div class="title ellipsis" title="{title}">{title}</div>
        <div class="flex-row flex-middle">
            <div class="tags ellipsis">
                {tags}
            </div>
            <time class="flex-col time">{date}</time>
        </div>
    </a>
</li>
</template>

<script src="//unpkg.com/hexo-theme-material-indigo@latest/js/search.min.js" async></script>






<script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>





</body>
</html>
